feat(helm): Add workflow for publishing the Helm chart to GitHub Pages. - #413
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughAdds Helm chart packaging and publication automation, introduces a dedicated Helm lint workflow, wires Helm tasks into the root Taskfile, and removes Helm linting from the common lint workflow. ChangesHelm chart publishing
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant HelmPackageTask
participant GhPages
GitHubActions->>HelmPackageTask: Run Helm package task
HelmPackageTask->>GitHubActions: Produce chart archive
GitHubActions->>GhPages: Check archive and index.yaml
GitHubActions->>GhPages: Copy chart and push updated index
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/spider-helm-publish.yaml:
- Around line 28-34: Set persist-credentials to false on both checkout steps in
the publish workflow: the checkout with submodules and fetch-depth settings and
the checkout in the publish job. Leave the later gh-pages checkout unchanged
because it requires credentials for git push.
- Around line 82-117: Replace direct GitHub expression interpolation in the
“Update Helm repository” and “Push to gh-pages branch” run scripts with
step-level env variables, then reference those variables as quoted shell data
for the chart version, ref name, and commit SHA. Use the existing GITHUB_SHA
environment variable for the SHA instead of templating it, and update chart_tgz
and commit_message construction accordingly.
- Around line 49-54: Replace the broad startsWith release-branch condition in
the publish job’s if gate with a script-based validation of GITHUB_REF_NAME,
allowing only main or branches matching ^v[0-9]+\.[0-9]+\.[0-9]+$. Ensure the
script exposes the validation result as a step output and use that output to
prevent invalid branches from publishing.
- Around line 17-22: Update the workflow-level concurrency block to use one
shared group for all gh-pages publishing runs instead of incorporating
github.ref, and exclude both main and v* release refs from cancel-in-progress.
Preserve cancellation for other branches so publish jobs are serialized across
main and release branches and protected from mid-push cancellation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: de6e9bf5-9956-4712-9225-6e29b047f585
📒 Files selected for processing (4)
.github/workflows/code-linting-checks.yaml.github/workflows/spider-helm-publish.yamltaskfile.yamltaskfiles/helm.yaml
💤 Files with no reviewable changes (1)
- .github/workflows/code-linting-checks.yaml
4b47a5a to
94a0d19
Compare
94a0d19 to
d8e0124
Compare
sitaowang1998
left a comment
There was a problem hiding this comment.
LGTM. @LinZhihao-723 Could you create the new gh-pages branch? I don't have permission to do this.
be7d1b6 to
bd4219b
Compare
90c0762
bd4219b to
90c0762
Compare
Co-authored-by: Junhao Liao <junhao@junhao.ca>
Description
This PR adds a GitHub Actions workflow to lint and publish the Spider Helm chart to a GitHub Pages-backed Helm repository (
https://github.com/y-scope/spider/raw/gh-pages), so that downstream charts (e.g., CLP's) can consume it as a dependency viahelm dependency updateinstead of vendoring a copy of the chart through http download.Note for reviewer:
The implementation mirrors CLP's proven chart-publishing workflow:
clp-package-helm.yamlbut adapted to this repo's conventions. The change is mostly following y-scope/clp#1891's implementation.Note for Spider maintainers:
One-time setup required:
The
publishjob checks out thegh-pagesbranch, which doesn't exist yet. It must be created once (as an empty orphan branch) before the first publish:git switch --orphan gh-pages git commit --allow-empty -m "ci(helm): Initialize Helm repository branch." git push origin gh-pagesAfter the first publish, the repository is consumable via:
Checklist
breaking change.
Validation performed
Note
The checks below were run against the fork
20001020ycx/spiderat this PR's head commit, withgh-pagescreated there per the maintainers' note above.1. Pushing to
mainpublishes the chart togh-pagesCreate the one-time
gh-pagesbranch, then fast-forward the fork'smainto this PR's head commit.Expected: the push triggers a
spider-helmrun onmainin whichlintandpublishboth succeed (fork run).2.
helm dependency updatedownloads the chart from the repositoryDeclare the published chart as a dependency of a scratch parent chart, then resolve it.
Expected:
Downloading spider from repo https://github.com/20001020ycx/spider/raw/gh-pages;fake-parent/charts/spider-0.1.2.tgzappears;fake-parent/Chart.lockpinsdigest: sha256:f12a4bd42da43a0e4a89acef7d3f879891127fb8b2e42f6ea1b74b88243eefe4.Verify the downloaded subchart renders through the parent and honors its
conditiongate.Verify
helm dependency buildreproducescharts/fromChart.lockalone.rm -rf fake-parent/charts helm dependency build fake-parent ls fake-parent/charts # -> spider-0.1.2.tgzSummary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes